const path = require("path");
const merge  = require("webpack-merge");
const baseConfug = require("./webpack.base");
const nodeExternals = require("webpack-node-externals")
const config = {
    // 运行在哪个环境下
    target:"node",
    // 入口文件
    entry:"./src/server/index.js",
    // 项目的打包路径
    output:{
        // 指定文件名字
        path:path.join(__dirname,"build"),
        filename:"bundle.js"
    },
    externals:[nodeExternals()]
}
module.exports = merge(baseConfug,config)